<template>
     <div class="shop-t w clearfix pb20 mb10 mt5">
       
            <div class="logo mt10"> <a href="" title=""><img height="60" alt="" src="@/assets/images/site_logo.png" /></a> </div>
            <div class="top-search">
                <div class="top-search-box clearfix">
                    <div class="form-fields">
                        <form method="GET" action="" class="clearfix">
                            <!---->
                            <ul class="select-act J_SearchType">
                                <li class="current"><span value="index">商品</span></li>
                                <li class=""><span value="store">店铺</span></li>
                            </ul>
                                <!-- <el-button type="success">搜索</el-button> -->
                            <input v-model="name" type="text" name="keyword" class="keyword" placeholder="芒果" style="width: 200px;height:20px" />
                            <input @click="searchpro()" type="button" value="搜索" class="submit"  hidefocus="true" style="text-align: center;"/>
                            
                        </form>
                    </div>
                </div>
                <div class="top-search-keywords"> <span>热门搜索：</span>
                    <a style="color:#ff0000;" href="">火龙果</a>
                    <a href="">西瓜</a>
                    <a href="">鸡蛋</a>
                    <a href="">猪肉</a>
                    <a href="">小龙虾</a>
                </div>
            </div>
            <div class="header_cart J_GlobalPop">
                <div class="item">
                    <div class="title clearfix"> <b></b> <router-link to="/cart" tag="a" class="column-btn" >去购物车结算</router-link><em>></em> </div>
                    <div class="shoping"><span class="count-cart J_C_T_GoodsKinds">0</span></div>
                    <div class="shadow"></div>
                    <!---->
                    <div class="cart-list eject-box">
                        <div class="nogoods clearfix"> <b></b>购物车中还没有商品，赶紧选购吧！ </div>
                    </div>
                    <!---->
                </div>
            </div>
        </div>
</template>

<script>
 export default{
    data(){
        return{
          
                name:'',
             
            
          
        }
    },
    methods:{
        searchpro(){
            this.$axios.get("/product/getByName/"+this.name).then(respData =>{
                sessionStorage.setItem("goods",JSON.stringify(respData.data.data))
                console.log(111)
                this.$router.push("/productsList/0")
            }
               
            )
        }
    },
    // mounted(){
    // console.log(222)
    // }
 }
</script>

<style scoped>

</style>